<template>
  <h1>Hello Vue3</h1>
  <h2>{{ obj }}</h2>
  <button @click="btn">改数据</button>
</template>

<script>
import { reactive } from 'vue'
export default {
  setup() {
    const obj = reactive({
      name: '张三',
      age: 18,
    })

    const btn = () => {
      obj.age++
      console.log(obj)
    }

    return { obj, btn }
  },
}
</script>

<style></style>
